跳到主要内容

Select

Selects the current graphic object.

Syntax

expression.Select();

expression - A variable that represents a ApiDrawing class.

Parameters

This method doesn't have any parameters.

Returns

This method doesn't return any data.

Example

This example selects the current graphic object.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let fill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
let stroke = Api.CreateStroke(0, Api.CreateNoFill());
let drawing = Api.CreateShape("rect", 3212465, 963295, fill, stroke);
paragraph.AddDrawing(drawing);
drawing.InsertParagraph("The Select property is applied to the drawing object", "before", false);
drawing.Select();